package cn.lasse.springframework;

import cn.lasse.springframework.aop.IUserService;
import cn.lasse.springframework.context.support.ClassPathXmlApplicationContext;
import org.junit.Test;

public class AutoProxy {
    @Test
    public void test_autoProxy() {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring-autoProxy.xml");
        IUserService userService = applicationContext.getBean("userServiceImpl", IUserService.class);
        System.out.println("测试结果：" + userService.queryUserInfo());
    }
}
